home *** CD-ROM | disk | FTP | other *** search
/ World of Education / World of Education.iso / world_m / mercuryz.zip / GIBBS.EKA < prev    next >
Text File  |  1992-03-24  |  392b  |  17 lines

  1. ; Graphic demo of Gibbs phenomenon.
  2. ; Fourier series convergence is slowest near discontinuities.
  3.  
  4. ; the function
  5.  f(x) := SUM(SIN((2n+1)x)/(2n+1),n,0,20)*4/PI
  6.  
  7. ; the domain for the plot
  8.  GBOUNDS 0, PI
  9.  PLOT f
  10.  
  11. ; Some commands which make the plot look nicer.
  12.  GSTYLE 1
  13.  GPOINTS 100
  14.  TITLE     "Gibbs phenomenon"
  15.  SUBTITLE  "for the square wave"
  16.  YLABEL    "20 Fourier terms"
  17.